package com.lin.fengxiu.dto;

import com.lin.fengxiu.dto.validators.PasswordEqual;
import lombok.*;
import org.hibernate.validator.constraints.Length;

/**
 * @ClassName PersonDTO
 * @Description TODO
 * @Author wushaopei
 * @Date 2021/3/7 17:58
 * @Version 1.0
 */
@Builder
@Getter
@AllArgsConstructor
@NoArgsConstructor
@PasswordEqual(min=1,message = "兩次密碼不相同")
public class PersonDTO {

    @Length(min=2,max=10,message = "xxxxx")
    private String name;
    private Integer age;

    private String password1;
    private String password2;
}
